package com.ruoyi.exception;

public class AsrException extends RuntimeException {

    private static final long serialVersionUID = 1L;

    /**
     * 错误码
     * 0 成功
     * 1 sdk初始化失败
     * 2 sdk销毁失败
     * 3 文件未找到
     * 4 网络异常
     * 5 语音识别失败
     * 6 语音处理失败
     * 7 程序异常
     * 8 音频文件处理异常
     */
    private String code;

    public AsrException(){}

    public AsrException(String message) {
        super(message);
    }

    public AsrException(String code, String message) {
        super(message);
        this.code = code;
    }

    public AsrException(String code,Throwable cause) {
        super(cause);
        this.code = code;
    }

    public AsrException(String code,String message, Throwable cause) {
        super(message, cause);
        this.code = code;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }


}
